using System;

using Open.Data.Persistence;

using Open.Data.Persistence.SqlServer;

namespace Open.Data.Persistence.Testing
{
    public enum PhoneType
    {
        Office = 0,
        Cell = 1,
        Fax = 2,
        Home = 3,
        Other = 4
    }

    public class Phone: Table
    {
        private int _Id;
        private PhoneType _Type;
        private string _Number;

        [PrimaryKey, SqlIdentity(1, 1)]
        public int Id
        {
            get
            {
                return _Id;
            }
            set
            {
                _Id = value;
            }
        }

        [Column]
        public PhoneType Type
        {
            get 
            {
                return _Type; 
            }
            set 
            { 
                _Type = value; 
            }
        }

        [Column, SqlLength(30)]
        public virtual string Number
        {
            get 
            { 
                return _Number; 
            }
            set 
            { 
                _Number = value; 
            }
        }
    }
}
